import { Column, CreateDateColumn, Entity, PrimaryGeneratedColumn } from "typeorm";
import { KitTags } from "../dto/create-kit.dto";
import { ActionDto } from "src/dtos/action.dto";

@Entity()
export class Kit {
    @PrimaryGeneratedColumn()
    id: number;

    @Column()
    type: 'kit';

    @Column()
    name: string;

    @Column()
    description: string;

    @Column('simple-array')
    tag: KitTags;

    @Column('longtext')
    content: string;

    @Column({
        nullable: true,
        type: 'longtext'
    })
    imageUrl: string;

    @CreateDateColumn()
    createAt: Date;

    @Column({
        nullable: true,
        type: 'json',
    })
    action:ActionDto;
}
